﻿Imports kplusEntity.KPLUS.Entity
Imports System.Data.OracleClient
Imports kplusData.KPLUS.Data
Imports kplusData

Namespace KPLUS.Logic
    Public Class LLimiteGlobal
        Dim objDLimiteGlobal As New DLimiteGlobal
        Dim objDLogMantenimiento As New DLogMantenimiento

        Public Function fListarLimiteGlobal(ByVal strConexion As String, ByVal strPeriodoMes As String) As List(Of ELimiteGlobal)
            Dim lstELimiteGlobal As New List(Of ELimiteGlobal)
            Using con As New OracleConnection(strConexion)
                con.Open()
                lstELimiteGlobal = objDLimiteGlobal.fListarLimiteGlobal(con, strPeriodoMes)
            End Using
            Return (lstELimiteGlobal)
        End Function
        Public Function fInsertarLimiteGlobal(ByVal strConexion As String, ByVal objLimiteGlobal As ELimiteGlobal, ByVal objLogMantenimiento As ELogMantenimiento) As Integer
            Dim N As Integer = -1
            Dim X As Integer = -1
            Using con As New OracleConnection(strConexion)
                con.Open()
                N = objDLimiteGlobal.fInsertarLimiteGlobal(con, objLimiteGlobal)
                X = objDLogMantenimiento.fInsertarLogMantenimiento(con, objLogMantenimiento)
            End Using
            Return N
        End Function
    End Class
End Namespace
